from rest_framework import serializers
from django.contrib.auth import get_user_model

LXUser = get_user_model()


class UserSerializer(serializers.ModelSerializer):
    """用户对象的序列化器"""
    class Meta:
        model = LXUser
        fields = ['uid', 'telephone', 'username', 'email', 'avatar', 'date_joined', 'is_active']
